package com.ftf.tp.blog.application.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 专栏前端实体
 *
 * @author tanghao
 * @date 2021/11/15
 */
@Data
public class ColumnVO implements Serializable{

    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 专栏作者id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 专栏名称
     */
    @NotEmpty(message = "专栏名称不能为空")
    private String columnName;

    /**
     * 专栏简介
     */
    private String columnIntroduction;

    /**
     * 专栏封面
     */
    private String columnCover;

    /**
     * 专栏订阅数
     */
    private Integer subscribeNumber;

    /**
     * 专栏文章数
     */
    private Integer blogNumber;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 创建人id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createdBy;

    /**
     * 更新人id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updatedBy;
}
